import random

def generate_test_cases():
    test_cases = [
        ("", 1),  # 空指令
        ("A", 2),  # 单指令A
        ("B", 2),  # 单指令B
        ("AB", 4), # 混合指令
        ("AABBA", 32) # 长指令
    ]
    
    # 生成随机测试用例
    for _ in range(5):
        length = random.randint(5, 10)
        s = ''.join(random.choice(['A','B']) for _ in range(length))
        test_cases.append((s, calculate(s)))
    
    return test_cases